<div class="content-box"><!-- Start Content Box -->
	<div class="content-box-header">
		<h3>Danh Sách nhập điểm điều kiện</h3>
	</div>
<!--------------------------------------------------------Content------------------------------------------->    	
	<div class="content-box-content" >
        <form action="" method="POST" id="formnoidung" name="dulieu">
        <table>
            <tr>
                <td><b>Đơn Vị</b></select></td>
                <td colspan="3">
                    <select name="donvi" id="donvi">
                    {foreach from=$ds_donvi item=dv}
                        <option value="{$dv->getma_donvi()}">{$dv->getten_donvi()}</option>
                    {/foreach}
                    </select> 
                </td>
                <td><b>Đơn vị HV</b></td>
                <td>
                    <select name="dvhv" id="dvhv">
                    {foreach from=$ds_dvhv item=dvhv}
                        <option value="{$dvhv->getma_donvihocvu()}">{$dvhv->getma_donvihocvu()}</option>
                    {/foreach}
                    </select>
                </td>
                <td><b>Khóa học</b></td>
                <td>
                    <select name="khoahoc" id="khoahoc">
                    {foreach from=$ds_namkhoahoc item=khoa}
                        <option value="{$khoa->getnam_khoahoc()}">{$khoa->getnam_khoahoc()}</option>
                    {/foreach}
                    </select>
                </td>                
                <td>Lớp:
                    <select name="lophc" id="lophc">
                        <option value="">---------------</option>
                    {foreach from=$dslop_hanhchinh item=lop}
                        <option value="{$lop.ma_lop}">{$lop.ten_lop}</option>
                    {/foreach}
                    </select>
                </td>
                <td>
                    <input type="submit" name="xem" value="Xem" class="button"/>
                    <input type="hidden" id="soluonglopmon" value="{$soluonglopmon}"/>
                </td>  
            </tr>             
        </table>
        <table>{$i=1}
            <tr>
                <th class="td-10  cangiua"><b>STT</b></th>
                <th class="td-200 cangiua"><b>Môn học</b></th>
                <th class="td-120 cangiua"><b>Ôn tập giải và đáp thắc mắc</b></td>
                <th class="td-100 cangiua"><b>Thi lần 1</b></th>
                <th class="td-100 cangiua"><b>Thi lần 2</b></th>
                <th class="td-400 cangiua"><b>Lớp học</b></th>
            </tr>
            {foreach from=$lich item=li}
                <tr>
                    <td>{$i++}</td>
                    <td>{$li.ten_mh}</td>
                    <td class="cangiua">
                        {if $li.ngaybatdau!=""}
                            {substr($li.ngaybatdau,0,5)},{$li.ngayketthuc}
                        {/if}
                    </td>
                    <td class="cangiua">
                        {foreach from=$ds_lichthi item=lt}
                            {if $li.ma_lopmon==$lt->getma_lopmon()&&$lt->getmadm_ttctlm()=='thilan1'}
                                <b>{$lt->getmadm_ca()}, {$lt->getngayhoc_ctlm()}</b>
                                {$cathi1=$lt->getmadm_ca()} {$ngaythi1=$lt->getngayhoc_ctlm()}
                                {break} 
                            {/if}
                        {/foreach}
                    </td>
                    <td class="cangiua">
                        {foreach from=$ds_lichthi item=lt}
                            {if $li.ma_lopmon==$lt->getma_lopmon()&&$lt->getmadm_ttctlm()=='thilan2'}
                                <b>{$lt->getmadm_ca()}, {$lt->getngayhoc_ctlm()}</b>
                                {$cathi2=$lt->getmadm_ca()} {$ngaythi2=$lt->getngayhoc_ctlm()}
                                {break} 
                            {/if}
                        {/foreach}
                    </td>
                    <td> &nbsp;&nbsp;&nbsp;
                        {foreach from=$dslophc item=lophc}
                            {if $li.ma_lopmon==$lophc.ma_lopmon}
                                {$lophc.ten_lop}, 
                            {/if}
                        {/foreach}
                    </td>
                    <td><a href="index.php?muc=diem&modul=add_diemdk&lop={$li.ma_lopmon}"><img src="images/edit.png" title="Chi tiết" width="20px" height="20px"/></a></td>
                </tr>
            {/foreach}
        </table>         
        
    </div> <!-- End .content-box-content -->
</div>